#include "stm32f10x_it.h"


uint16_t key4_num=0;
uint16_t get_key4_value(void){
	return key4_num;
}

void EXTI4_IRQHandler(void){
	
	if (EXTI_GetITStatus(EXTI_Line4)!=RESET)
	{
		key4_num++;
		if (key4_num > 2){
			key4_num = 0;
		}
		
		if (key4_num ==0){
			Serial3_SendString(WIFI_MODE);
		}
		else if (key4_num ==1){
			Serial3_SendString(CONNECT_WIFI);
		}
		else if (key4_num ==2){
			Serial3_SendString(CONNECT_TCP);
		}

		EXTI_ClearITPendingBit(EXTI_Line4);
	}
}

void EXTI3_IRQHandler(void){
	
	if (EXTI_GetITStatus(EXTI_Line3)!=RESET)
	{
		EXTI_ClearITPendingBit(EXTI_Line3);
	}
}





